<%@ page import="Domain.DataManager"%>
<%@ page import="Domain.UserClient.ButtonsFunctions"%>

<%
	if (session.getAttribute("dm") == null)
		response.sendRedirect("Welcome.jsp");
%>

<%
	DataManager dm = (DataManager) (session.getAttribute("dm"));
	ButtonsFunctions bf = (ButtonsFunctions) (session.getAttribute("bf"));
	
	String userName = (String)request.getParameter("userName");
	bf.processCheckAvailability(userName);
	boolean ans = dm.getAvailable();
	if(ans)
		out.print("<font color=\"red\">Available</font>");
	else
		out.print("<font color=\"red\">Not available</font>");
%>